<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/4
 * Time: 16:14
 */

namespace app\common\validate;

class Supply extends \think\Validate
{
    protected $rule = [
        'title|标题' => 'require|max:100|token',
        'center|文章内容' => 'require',
        'miaoshu|文章摘要' => 'require',
        'price|价格' => 'require|number',
        'status' => 'number|in:2,1,0',
    ];

    protected $message = [
        'status' => '校验范围不合法',
    ];

    protected $scene = [
        'edit' => ['title','center','miaoshu','status'],
    ];

}